(function() {
let Cc = Components.classes, Ci = Components.interfaces;
let prefs = Cc['@mozilla.org/preferences-service;1'];
let prefService = prefs.getService(Ci.nsIPrefService);
let prefBranch = prefService.getBranch('extensions.twentyten.');
function init() {
  window.removeEventListener('load', init, false);
  if (!navigator.oscpu.match('NT 6')) {
   window.document.getElementById('glasstoggle').disabled = true;
  }
}
window.TwentyTenBuddyOption = {
  onResetCommand: function(evt) {
    var keys = prefBranch.getChildList('', {});
    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];
      if (prefBranch.prefHasUserValue(key))
        prefBranch.clearUserPref(key);
    }
  }
};
window.addEventListener('load', init, false);
})();